@layout("/common/_container.html"){
<style>
    .ui-state-default {
        height: 40px;
        background: #fff;
        border: 1px solid aliceblue;
        line-height: 40px;
        border-radius: 3px;
        margin-bottom: 2px;
        width: 50%;
    }

    .ui-state-default:hover {
        cursor: pointer;
    }

    .title {
        background: #000;
        color: #fff;
    }

    .sortLeft {
        padding-right: 20px;
    }

    .sortRight {
        padding-right: 20px;
    }

    .ui-sortable {
        /*float: right;*/
    }

    .right_box {
        width: 330px;
        height: 400px;
        position: absolute;
        top: 57px;
        left: 590px;
        border: 1px solid #1E84C6;
    }
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="addForm">
            <input type="hidden" id="sortMap" value="">
            <input type="hidden" id="reservationsId" value="${reservationsId}">
            <input type="hidden" id="customerId" value="${customerId}">
            <input type="hidden" id="operationTime" value="${operationTime}">
            <input type="hidden" id="totleServiceActualPay" value="">
            <input type="hidden" id="surplusAmount" value="0">
            <div class="row">
                <div class="col-sm-12">
                    <div class="row">
                        <div id="Div2">
                            <div>
                                门诊：${consultantInfo.outpatientName}&nbsp
                                病历号：${consultantInfo.medicalRecordNumber}&nbsp
                                姓名：${consultantInfo.customerName}&nbsp
                                性别：${consultantInfo.sex}&nbsp
                                年龄：${consultantInfo.customerAge}&nbsp
                                电话：${consultantInfo.customerPhone}&nbsp
                                现场TC：${consultantInfo.tcName}
                            </div>
                        </div>
                        <div class="panel-body">
                            <h2>开单详情</h2>
                        </div>
                        <div style="width:1300px;height:300px;overflow:auto;" class="panel panel-success sortRight">
                            <div id="openBillbutton">
                            </div>
                            <div id="openBillList">
                            </div>
                            <div id="openBillMoney">
                            </div>
                            <div>
                                <#button btnCss="info" name="选择结账方式" id="ensure" icon="fa-check" clickFun="Recharge.choiceCheckoutMethodd()"/>
                            </div>
                            <div id="checkoutMethodDetails" class="row">
                            </div>
                            <div class="row">
                                &nbsp结账金额合计：<input disabled="disabled" id="total" value="0">元
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="Recharge.checkOutd()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="Recharge.closes()"/>
                </div>
            </div>
        </div>
    </div>
</div>

<link rel="stylesheet" href="${ctxPath}/static/css/jqui/jquery-ui.min.css">
<script src="${ctxPath}/static/js/jquery-ui.min.js"></script>
<script src="${ctxPath}/static/modular/arrival/customer/recharge.js"></script>
<script>
    $.ajax({
        url: Feng.ctxPath + "/consultant/getOpenBillLists",
        type: "post",
        data: {
            "operationTime": $("#operationTime").val(),
            "customerId": $("#customerId").val(),
            "getTime": $("#getTime").val(),
            "reservationsId": $("#reservationsId").val()
        },
        success: function (data) {
            $('#openBillList').html("");
            ss = "";
            s2 = "";
            s1 = ' <div class="row"> &nbsp&nbsp应收金额：' + data[data.length - 1].totleServiceActualPay.toFixed(2) + '元</div>';
            s2 = ' <div class="row">&nbsp&nbsp成交状态：' + data[data.length - 1].dealStatus + '</div>';
            document.getElementById("totleServiceActualPay").value = data[data.length - 1].totleServiceActualPay;
            $('#openBillbutton').html(s2);
            $('#openBillList').html(ss);
            $('#openBillMoney').html(s1);
        },
        error: function (data) {
            alert('内部故障!');
        }
    });

</script>
@}
